# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=faradaysec
pkgver=13509.bd132bb46
pkgrel=1
pkgdesc='Collaborative Penetration Test and Vulnerability Management Platform.'
groups=('blackarch' 'blackarch-scanner' 'blackarch-exploitation'
        'blackarch-fuzzer' 'blackarch-fingerprint' 'blackarch-automation'
        'blackarch-misc')
arch=('x86_64' 'aarch64')
url='http://www.faradaysec.com/'
depends=('couchdb' 'python' 'gtk3' 'gobject-introspection' 'python-argparse'
         'gobject-introspection-runtime' 'python-gobject' 'vte3' 'zsh' 'curl'
         'python-couchdb' 'python-mockito' 'python-whoosh' 'python-ipy'
         'python-requests' 'python-tornado' 'python-flask' 'python-anyascii'
         'python-colorama' 'java-environment' 'python-pip' 'python-dateutil'
         'pyqt3' 'libpqxx' 'python-psycopg2' 'ruby' 'python-apispec-webframeworks'
         'python-lxml' 'python-pysqlite3' 'python-sphinx' 'python-twisted'
         'python-beautifulsoup4' 'python-sqlalchemy' 'python-werkzeug'
         'python-w3af-api-client' 'python-urllib3' 'python-responses'
         'python-simplejson' 'python-pytz' 'python-pytest' 'python-msgpack'
         'python-itsdangerous' 'python-deprecation' 'python-click'
         'python-slugify' 'python-hypothesis' 'python-autobahn'
         'python-pgcli' 'python-alembic' 'python-websocket-client'
         'python-tqdm' 'python-flask-sqlalchemy' 'python-marshmallow'
         'python-pillow' 'python-service-identity' 'python-webargs'
         'python-selenium' 'python-shodan' 'python-bcrypt' 'python-simplekv'
         'python-wtforms' 'python-flask-login' 'python-flask-security'
         'python-pyopenssl' 'python-pyasn1' 'python-tqdm' 'python-apispec'
         'python-marshmallow-sqlalchemy' 'python-flask-classful'
         'python-filteralchemy-fork' 'python-filedepot' 'python-nplusone'
         'python-flask-restless' 'python-syslog-rfc5424-formatter'
         'python-flask-kvsession-fork' 'python-distro' 'python-faraday-plugins'
         'python-pendulum' 'python-prompt_toolkit' 'python-email-validator'
         'postgresql')
makedepends=('git')
options=('!strip')
license=('GPL')
source=("$pkgname::git+https://github.com/infobyte/faraday.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's/>=.*//g' requirements.txt
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

